package com.microtf.inscription.jpa;

import com.microtf.inscription.jpa.entity.BlogPost;
import com.microtf.inscription.jpa.entity.BlogComment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * 博客内容jpa
 *
 * @author guliuzhong
 */
public interface BlogCommentJpa extends JpaRepository<BlogComment, Integer> {
    /**
     * 根据blog标题查询评论
     *
     * @author guliuzhong
     *
     * @param blogPost 博客内容
     * @param pageable 评论分页
     * @return 带分页的评论
     */
    Page<BlogComment> findBlogCommentByBlogPost(BlogPost blogPost, Pageable pageable);
}
